{{! 文件上传的时候必须是二进制的编码，所以使用enctype为multipart/form-data,但是这会造成表单提交的时候request无法获取到表单里面传递的input }}
<form class="form-horizontal" role="form" enctype="multipart/form-data" method="POST" action="/contest/vacation-photo/{{year}}/{{month}}">
    <div class="form-group">
        <label for="fieldName" class="col-sm-2 control-label">Name</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" id="fieldName" name="name">
        </div>
    </div>

    <div class="form-group">
        <label for="fieldEmail" class="col-sm-2 control-label">Email</label>
        <div class="col-sm-4">
            <input type="email" class="form-control" required id="fieldEmail" name="email">
        </div>
    </div>

    <div class="form-group">
        <label for="fieldPhoto" class="col-sm-2 control-label">Vacation Photo</label>
        <div class="col-sm-4">
            <input type="file" class="form-control" required accept="image/*" id="fieldPhoto" name="photo">
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-4">
            <button type="submit" class="btn btn-default">Submit</button>
        </div>
    </div>
</form>